import { baseUrlApi, requestClient, type Result } from '#/api/request';

/** 小程序列表 */
export const getWxapps = () => {
  return requestClient.get<Result>(
    baseUrlApi('/plugin/wechat/api_admin_wxapp/index'),
  );
};

/** 新增小程序 */
export const postWxapps = (data: object) => {
  return requestClient.post<Result>(
    baseUrlApi('/plugin/wechat/api_admin_wxapp/save'),
    data,
  );
};

/** 更新小程序 */
export const putWxapps = (data: object) => {
  return requestClient.put<Result>(
    baseUrlApi('/plugin/wechat/api_admin_wxapp/update'),
    data,
  );
};

/** 删除小程序 */
export const deleteWxapps = (data: object) => {
  return requestClient.delete<Result>(
    baseUrlApi('/plugin/wechat/api_admin_wxapp/delete'),
    data,
  );
};
